<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="report.style" name="style">
    <style type="text/css">
         body {
         	color: #000 !important;
         	}
         
         .border-black td {
         	border-top: 1px solid black !important;
         	}
         
         .table-condensed > thead > tr > th {
	        border-top: 1px solid black !important;
	        border-bottom: 1px solid black !important;
	        border-left: 1px solid black !important;
	        border-right: 1px solid black !important;
         	}
         
         .zero_min_height {
         	min-height: 0px !important;
         	}
         
         table {
		   	counter-reset: rowNumber;
	     	}
	
		table tr.kolum {
		    counter-increment: rowNumber;
			}
	
		table tr.kolum td:first-child::before {
		    content: counter(rowNumber);
		    min-width: 1em;
		    margin-right: 0.0em;
			}
	
		.border-all {
            border-top: 1px solid black !important;
            border-bottom: 1px solid black !important;
            border-left: 1px solid black !important;
            border-right: 1px solid black !important;
            }
	             
		.border-LRB {
            border-bottom: 1px solid black !important;
            border-left: 1px solid black !important;
            border-right: 1px solid black !important;
            }
             
        .border-RTB {
            border-right: 1px solid black !important;
            border-top: 1px solid black !important;
            border-bottom: 1px solid black !important;
            }
                          
         .border-left {
            border-left: 1px solid black !important;
            }
          
         .upper-line {
            border-top: 1px solid black !important;
            }
            
         .upper-thinline {
            border-top: 1px solid lightgrey !important;
            }
            
         .greybgcolor {
            background-color: lightgrey;
            }

          p.ex {
			color: rgb(255,255,255);
			}
	
		 h3.ex {
			color: rgb(255,255,255);
			}
		
		 span.ex {
			color: rgb(255,255,255);
			}
		 
		 span.ex1 {
			color: lightgrey;
			}
		 
		 .underline {
			text-decoration: underline;
			}
		
		 h4.redline {
             border-bottom: 2px solid red !important;
             }
	
         </style>
     </template>

<template id="belber_so_doc">
    <t>
	    <div class="header">
	    	<div class="row">
				<div class="col-xs-3">
                	<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 100px;"/>
            	</div>
            	<div class="col-xs-5 col-xs-offset-1">
            		<h3 class="mt0 mb0"><strong><span>ORDER CONFIRMATION</span></strong></h3>
		        </div>
		        <div class="col-xs-3 col-xs-offset-0">
            		<h3 class="mt0 mb0"><strong><span>OA# </span><span t-field="o.name"/></strong></h3>
		        </div>
            </div>
            <div class="row mt8 mb8"/>
	    </div>
	    
	    <div class="page">
            <div class="oe_structure"/>
            <div class="row mt8 mb8">
            	<p class="mt0 mb0 greybgcolor"><strong><span class="ex1">1</span><span>VENDOR INFORMATION:</span></strong></p>
            </div>
		    <div class="row">
		    	<div class="col-xs-6">
	           		<p class="mt0 mb0"><strong><span>	Company name: </span><span t-field="o.company_id.name"/></strong></p>
	            	<p class="mt0 mb0"><strong><span>	Department: </span></strong></p>
	            	<p class="mt0 mb0"><strong><span>	Address: </span></strong><span t-field="o.company_id.street"/> <span t-field="o.company_id.street2"/> <span t-field="o.company_id.city"/> <span t-field="o.company_id.country_id.name"/></p>
	            	<p class="mt0 mb0"><strong><span>	Tel.: </span></strong><span t-field="o.company_id.phone"/></p>
	            	<p class="mt0 mb0"><strong><span>	Contact/Email: </span></strong><span t-field="o.company_id.email"/></p>
		    	</div>
	    		<div class="col-xs-5 col-xs-offset-1">
	           		<br class="mt0 mb0"/>
	            	<br class="mt0 mb0"/>
	            	<br class="mt0 mb0"/>
	            	<br class="mt0 mb0"/>
	            	<p class="mt0 mb0"><strong><span>Sales Rep: </span></strong><span t-field="o.user_id.name"/>, <span t-field="o.user_id.email"/></p>
	    		</div>
		    </div>
		    <div class="row mt8 mb8">
            	<p class="mt0 mb0 greybgcolor"><strong><span class="ex1">2</span><span>CUSTOMER INFORMATION:</span></strong></p>
            </div>
		    <div class="row">
		    	<div class="col-xs-6">
		    		<p class="mt0 mb0"><strong><span>	Company ID: </span><span t-field="o.partner_id.ref"/></strong></p>
	           		<p class="mt0 mb0"><strong><span>	Company name: </span><span t-field="o.partner_id.name"/></strong></p>
	            	<p class="mt0 mb0"><strong><span>	Address: </span></strong><span t-field="o.partner_id.street"/> <span t-field="o.partner_id.street2"/> <span t-field="o.partner_id.city"/> <span t-field="o.partner_id.country_id.name"/></p>
	            	<p class="mt0 mb0"><strong><span>	Tel.: </span></strong><span t-field="o.partner_id.phone"/></p>
	            	<p class="mt0 mb0"><strong><span>	Contact/Email: </span></strong><span t-field="o.partner_id.email"/></p>
		    	</div>
		    	<div class="col-xs-5 col-xs-offset-1">
		    		<p class="mt0 mb0"><strong><span>Belber Order#: </span></strong><span t-field="o.name"/></p>
	           		<p class="mt0 mb0"><strong><span>Season: </span></strong><span t-field="o.season"/></p>
	            	<p class="mt0 mb0"><strong><span>Customer PO#: </span></strong><span t-field="o.cust_po_no"/></p>
	            	<p class="mt0 mb0"><strong><span>Order/PO received date: </span></strong><span t-field="o.order_po_received_date"/></p>
	            	<br class="mt0 mb0"/>
		    	</div>
		    </div>
		    <div class="row mt8 mb8">
            	<p class="mt0 mb0 greybgcolor"><strong><span class="ex1">3</span><span>INVOICE TO:</span></strong></p>
            </div>
		    <div class="row">
		    	<div class="col-xs-6">
	           		<p class="mt0 mb0"><strong><span>	Company name: </span><span t-field="o.partner_invoice_id.name"/></strong></p>
	            	<p class="mt0 mb0"><strong><span>	Address: </span></strong><span t-field="o.partner_invoice_id.street"/> <span t-field="o.partner_invoice_id.street2"/> <span t-field="o.partner_invoice_id.city"/> <span t-field="o.partner_invoice_id.country_id.name"/></p>
	            	<p class="mt0 mb0"><strong><span>	Tel.: </span></strong><span t-field="o.partner_invoice_id.phone"/></p>
	            	<p class="mt0 mb0"><strong><span>	Contact/Email: </span></strong><span t-field="o.partner_invoice_id.email"/></p>
		    	</div>
		    </div>	
		    <div class="row mt8 mb8">
            	<p class="mt0 mb0 greybgcolor"><strong><span class="ex1">4</span><span>SHIP TO:</span></strong></p>
            </div>
		    <div class="row">
		    	<div class="col-xs-6">
	           		<p class="mt0 mb0"><strong><span>	Company name: </span><span t-field="o.partner_shipping_id.name"/></strong></p>
	            	<p class="mt0 mb0"><strong><span>	Address: </span></strong><span t-field="o.partner_shipping_id.street"/> <span t-field="o.partner_shipping_id.street2"/> <span t-field="o.partner_shipping_id.city"/> <span t-field="o.partner_shipping_id.country_id.name"/></p>
	            	<p class="mt0 mb0"><strong><span>	Tel.: </span></strong><span t-field="o.partner_shipping_id.phone"/></p>
	            	<p class="mt0 mb0"><strong><span>	Contact/Email: </span></strong><span t-field="o.partner_shipping_id.email"/></p>
		    	</div>
		    </div>
		     <div class="row mt8 mb8">
            	<p class="mt0 mb0 greybgcolor"><strong><span class="ex1">5</span><span>PAYMENT CONDITIONS AND DELIVERY:</span></strong></p>
            </div>
		    <div class="row">
		    	<div class="col-xs-6">
		    		<p class="mt0 mb0"><strong><span>	Tax Exempt: </span></strong><span t-field="o.tax_exempt"/></p>
	           		<p class="mt0 mb0"><strong><span>	Payment terms: </span></strong><span t-field="o.payment_term"/></p>
	            	<p class="mt0 mb0"><strong><span>	Delivery date: </span></strong><span t-field="o.delivery_date"/></p>
	            	<p class="mt0 mb0"><strong><span>	Shipping method: </span></strong><span t-field="o.shipping_method"/></p>
	            	<p class="mt0 mb0"><strong><span>	Shipping terms: </span></strong><span t-field="o.incoterm"/></p>
		    	</div>
		    	<div class="col-xs-5 col-xs-offset-1">
		    		<br class="mt0 mb0"/>
		    		<br class="mt0 mb0"/>
	           		<br class="mt0 mb0"/>
	            	<p class="mt0 mb0"><strong><span>Cancel date: </span></strong><span t-field="o.cancel_date"/></p>
	            	<br class="mt0 mb0"/>
	            	<br class="mt0 mb0"/>
		    	</div>
		    </div>
            <div class="row">
            <table class="table table-condensed">
                <thead>
                    <tr>
                    	<th class="text-center greybgcolor">No</th>
                    	<th class="text-center greybgcolor">Code</th>
                        <th class="text-center greybgcolor">Description</th>
                        <th class="text-center greybgcolor">Unit. Price</th>
                        <th class="text-center greybgcolor">Unit</th>
                        <th class="text-center greybgcolor">Qty</th>
                        <th class="text-center greybgcolor">Ttl Amt</th>
                    </tr>
                </thead>
				<tbody class="invoice_tbody">
					<t t-foreach="o.order_line" t-as="l">
						<tr class="kolum">
							<td width="5%"/>
							<td width="15%"><span t-field="l.product_id.name_template"/></td>
							<td width="40%"><span t-field="l.description"/></td>
							<td width="15%" class="text-right">
	                            <span t-field="l.price_unit"
	                            	t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
	                        <td width="7%"><span t-field="l.product_uom.name"/></td>
							<td width="8%" class="text-right"><span t-field="l.product_uom_qty"/></td>
	                        </td>
	                        <td width="10%" class="text-right">
	                            <span t-field="l.price_subtotal"
	                            	t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
	                        </td>
						</tr>
					</t> 
                </tbody>
            </table>
            </div>
            <div class="oe_structure"/>
        </div>
        
        <div class="footer">
			<div class="row signature" style="visibility:hidden;">
				<div class="row col-xs-12 upper-line"></div>
				<div class="col-xs-5 pull-right">
			        <table class="table table-condensed">
			            <tr>
			                <td width="59%" class="text-right border-all greybgcolor"><strong>Total</strong></td>
			                <td width="19%" class="text-right border-all"><strong t-field="o.amount_qty"/></td>
			                <td width="22%" class="text-right border-all">
			                     <strong t-field="o.amount_total"
			                     	t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
			                </td>
			            </tr>
			        </table>
		    	</div>
		    	<div class="row mt0 mb0"/>
				<div class="col-xs-12">
					<p class="mt0 mb0"><span>ADDITIONAL INFORMATION:</span></p>
					<p class="mt0 mb0"><span>BAGS ARE SHIPPED INSIDE THEIR DUST BAGS, FULLY PADDED AND PROTECTED AND PACKED IN INDIVIDUAL BOXES INSIDE A MASTER CARTON</span></p>
					<p class="mt0 mb0"><span>SMALL LEATHER GOODS ARE SHIPPED DIRECTLY IN THEIR BELBER GIFT BOX</span></p>
					<p class="mt0 mb0"><span>ALL ITEMS ARE CLEARLY IDENTIFIED WITH AN OUTSIDE LABEL SHOWING SKU/, MODEL &amp; COLOR DESCRIPTION AND RETAIL PRICE</span></p>
				</div>
				<div class="row mt8 mb8"/>
				<div class="col-xs-12">
					<p class="mt0 mb0"><span>PLEASE REFER TO THE ATTACHED STANDARD TERMS &amp; CONDITIONS OF SALE</span></p>
				</div>
				<div class="row mt8 mb8"/>
				<div class="col-xs-12">
					<p class="mt0 mb0"><span>BELBER 1891 acknowledges receipt of the above order.</span></p>
					<p class="mt0 mb0"><span>Please check that all the information is correct.</span></p>
				</div>
				<div class="row mt8 mb8"/>
				<div class="col-xs-12">
					<p class="mt0 mb0"><span>For or on behalf of</span></p>
				</div>
				<div class="row mt16 mb16"/>
				<div class="col-xs-5 pull-right">
					<p class="mt0 mb0 upper-line"><span t-field="o.company_id.name"/></p>
				</div>
			</div>
        	<div class="row"/>
	        <div class="text-right">
	            <small>
	                <span>Page</span>
	                <strong><span class="page"/></strong>
	                of
	                <strong><span class="topage" /></strong>
	            </small>
	        </div>
	    </div>
	</t>
</template>

<template id="belber_sale_order">
    <t t-call="report.html_container">
        <t t-foreach="doc_ids" t-as="doc_id">
            <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang','belber_module.belber_so_doc')"/>
        </t>
    </t>
</template>
</data>
</openerp>
